package SingleLinkedList;//无头单向链表的手动实现

public class Main {
    public static void main(String[] args) {
        MySingleLinkedList list = new MySingleLinkedList();
        /*list.creatList();
        System.out.println(list.size());
        System.out.println(list.contains(34));
        list.dispaly();*/

        list.addFirst(01);
        list.addFirst(12);
        list.addFirst(23);
        list.addFirst(34);
        list.addFirst(45);
        list.addFirst(45);
        list.addLast(56);
        list.addLast(67);
        list.addLast(78);
        list.addLast(89);
        list.addLast(910);
        list.addLast(45);
        list.dispaly();
        System.out.println(list.contains(1));
        list.addIndex(9,20);
        list.dispaly();
        list.remove(20);
        list.remove(89);
        list.dispaly();
        list.removeAllKey(45);
        list.dispaly();
        list.clear();
        System.out.println("===============");
        list.dispaly();
        System.out.println("===============");
    }

}